import 'package:seedfour/generated/json/base/json_field.dart';
import 'package:seedfour/generated/json/income_invoice_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class IncomeInvoiceEntity {
  String? cargo;
  String? showTab;
  String? email;
  List<IncomeInvoiceRelateCases>? relateCases;
  List<IncomeInvoiceOrderAttach>? orderAttachs;
  String? taxid;
  String? address;
  String? phone;
  String? bankname;
  String? bankacct;
  String? remark;
  String? title;

  IncomeInvoiceEntity();

  factory IncomeInvoiceEntity.fromJson(Map<String, dynamic> json) =>
      $IncomeInvoiceEntityFromJson(json);

  Map<String, dynamic> toJson() => $IncomeInvoiceEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class IncomeInvoiceRelateCases {
  String? caseId;
  String? caseName;
  String? time;

  IncomeInvoiceRelateCases({this.caseId, this.caseName, this.time});

  factory IncomeInvoiceRelateCases.fromJson(Map<String, dynamic> json) =>
      $IncomeInvoiceRelateCasesFromJson(json);

  Map<String, dynamic> toJson() => $IncomeInvoiceRelateCasesToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class IncomeInvoiceOrderAttach {
  String? name;
  String? url;

  IncomeInvoiceOrderAttach({this.name, this.url});

  factory IncomeInvoiceOrderAttach.fromJson(Map<String, dynamic> json) =>
      $IncomeInvoiceOrderAttachFromJson(json);

  Map<String, dynamic> toJson() => $IncomeInvoiceOrderAttachToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
